package com.jml.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SecurityControllerBack {
	//有这个角色 ROLE_角色   前缀ROLE_一点要有
	@PreAuthorize("hasRole('ROLE_ADMIN')")
	@RequestMapping("/roleAuthBack")
	public String role() {
		return "admin auth";
	}


}
